package com.tom.demo.mapper;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.tom.demo.common.entity.SysRole;
import com.tom.demo.dto.RoleSearchDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;
import java.util.Set;

/**
* @author Administrator
* @description 针对表【sys_role(角色信息表)】的数据库操作Mapper
* @createDate 2024-11-18 21:51:16
* @Entity generator.domain.SysRole
*/
@Mapper
@DS("master")
public interface SysRoleMapper {

    int deleteByPrimaryKey(String id);

    int insert(SysRole record);

    SysRole selectByPrimaryKey(String id);

    int updateByPrimaryKey(SysRole record);

    Set<String> findByRoleKey(@Param("userId")String userId);

    List<SysRole> findByUserId(@Param("userId")String userId);


    List<SysRole> pageList(RoleSearchDto roleSearchDto);

    int findOne(@Param("roleName")String roleName,
                @Param("roleKey")String roleKey,
                @Param("roleId")String roleId);

    List<SysRole> selectAll();

    List<SysRole> findByRoleIds(@Param("roleIds")List<String> roleIds);

}
